<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="s"  uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="<%=request.getContextPath() %>/css/Style.css" type="text/css" rel="stylesheet">
<style type="text/css">
</style>
<script type="text/javascript">
	function checkSubmit(){
			document.getElementById("errormsg").innerHTML="";
			var op= document.getElementById("oldpassword").value;
			var np= document.getElementById("newpassword").value;
			var rp= document.getElementById("repassword").value;
			if(op==""){
					alert("请输入旧密码！");
					return ;
				}
			if(np==""){
				alert("请输入新密码！");
				return;
			}
			if(rp==""){
				alert("请输入确认密码！");
				return;
			}
			if(np!=rp){
				alert("确认密码和新密码不匹配！");
				return;
				}
			if(np==op){
					alert("新密码不能和旧密码相同");
					return;
				}
			document.getElementById("c_from").submit();
		}
</script>
</head>
<body>
<table border="0" cellspacing="0" cellpadding="0" class="thead" width="100%">
	<tr><td style="padding:3px;">当前位置:密码修改</td></tr>
</table>

<form action="<%=request.getContextPath() %>/admin/changePassword.htm" method="post" id="c_from">
<table cellspacing="0" cellpadding="0"  border="1" width="100%" class="Table1">
	<tbody>
		<tr>
		<td></td>
		<td id="errormsg"><s:fielderror/></td>	
		</tr>
		<tr>
			<td height="25" align="right">旧密码：</td>
			<td><input type="password" name="oldpassword" maxlength="40" id="oldpassword" value=""/></td>
		</tr>
		<tr>
			<td height="25" align="right">新密码：</td>
			<td><input type="password" name="newpassword" maxlength="40" id="newpassword"  value=""/></td>
		</tr>
		<tr>
			<td height="25" align="right">确认新密码：</td>
			<td><input type="password" name="repassword" maxlength="40" id="repassword"  value=""/></td>
		</tr>
		<tr>
			<td height="25" colspan="2" align="center"><input type="button" onclick="checkSubmit();" value="确定" /></td>
		</tr>
	</tbody>
</table>
</form>
</body>
</html>